<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;

class VideoCategory extends Model
{



    protected $table = 'video_category';


    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format($this->getDateFormat());
    }
    /**
     * 获取该分类下的所有视频
     */
    public function videos()
    {
        return $this->hasMany(Video::class, 'category_id');
    }
}
